<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>数据字典</title>
    <%@ include file="../au_inc.jsp" %>
    
    <script type="text/javascript">
    //所有的子窗体都需要有一个save函数，当点击弹出窗体的保存按钮时所进行的操作
    function btnSave_click()
    {
        var fun_ret = false;
    
       var vals =$('#formModule').serialize();
       var url = '${baseUrl }/admin/dataDict/save';
       $.ajax({
           async: false, 
           type: "POST", 
           url : url,
           data:vals,
           cache:false,
           dataType : 'json', 
           success : function(data) { 
               if(data.success!=0)
               {
                   top.Ext.Msg.alert("提示",data.msg);
               }
               else
               {
                   fun_ret = true;
               }
           } 
       });
       return fun_ret;
    }
    
    function btnDepartment_click()
    {
        var params = {
                winId:'win_select_dataDict',
                title:'部门信息',
                width:340,
                height:380,
                showUrl:'${baseUrl}/admin/dataDict/select_dep',
                txtId:'deppId',   //填充的编号的id值
                txtName:'pname', //填充的名称的ID值
        };
        open_select_fun(params);
    }
    </script>
  </head>
  <body>
        <div style="padding:1px">
        <form id="formModule" method="post">
            <input id="id" type="hidden" name="dataDict.id" value="${dataDict.id }">
            <table border="0">
                <c:if test="${type==0 || type == 3}">
                <tr>
                    <td>数据组名称：</td>
                    <td><input id="name" class="easyui-validatebox textbox" type="text" name="dataDict.name" data-options="required:true" style="width:202px" value="${dataDict.name }"></input></td>
                </tr>
                <tr>
                    <td>识别码：</td>
                    <td><input id="code" class="easyui-validatebox textbox" type="text" name="dataDict.code" data-options="required:true" style="width:202px" value="${dataDict.code }"></input></td>
                </tr>
                </c:if>
                <c:if test="${type==1 || type == 2}">
                <tr>
                    <td>数据组名称：</td>
                    <td><input id="pname" class="easyui-textbox" type="text" name="pname" style="width:160px" value="${pname }" readonly="readonly"></input>
                        <input id="datId" type="hidden" name="dataDict.dat_id" value="${datId }">
                    </td>
                </tr>
                <tr>
                    <td>数据项名称：</td>
                    <td><input id="name" class="easyui-textbox" type="text" name="dataDict.name" style="width:160px" value="${dataDict.name }"></input></td>
                </tr>
                </c:if>
                <tr>
                    <td>显示顺序：</td>
                    <td><input id="showOrder" class="textbox" type="text" name="dataDict.show_order" data-options="" style="width:100px" value="${dataDict.show_order }"></input></td>
                </tr>
                <tr>
                    <td>状态：</td>
                    <td><select id="status" name="dataDict.status">
                            <option value="9" <c:if test="${dataDict.status==9}">selected</c:if>>启用</option>
                            <option value="0" <c:if test="${dataDict.status==0}">selected</c:if>>禁用</option>
                        </select></td>
                </tr>
            </table>
        </form>
        </div>
  </body>
</html>
